<?php
include "konek.php";
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$a = date("Y-m-d");
$x=date("Y");
$cx2= $x.'-02';
$feb = mysql_query("select count(*) as FEB from ticket where close_date like '%$cx2%' and status='Close' order by ticket_id desc");
//var_dump(mysql_fetch_array($jan));
$feb1=  mysql_fetch_array($feb);
$february= $feb1['FEB'];
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$cx3= $x.'-01';
$jan = mysql_query("select count(*) as FEB from ticket where close_date like '%$cx3%' and status='Close' order by ticket_id desc");
$jan1=  mysql_fetch_array($jan);
$january = $jan1['FEB'];
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$cx4= $x.'-03';
$mar = mysql_query("select count(*) as FEB from ticket where close_date like '%$cx4%' and status='Close' order by ticket_id desc");
$mar1=  mysql_fetch_array($mar);
$maret = $mar1['FEB'];
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$cx5= $x.'-04';
$apr = mysql_query("select count(*) as FEB from ticket where close_date like '%$cx5%' and status='Close' order by ticket_id desc");
$apr1=  mysql_fetch_array($apr);
$april = $apr1['FEB'];
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$cx6= $x.'-05';
$mei = mysql_query("select count(*) as FEB from ticket where close_date like '%$cx6%' and status='Close' order by ticket_id desc");
$mei1=  mysql_fetch_array($mei);
$meys = $mei1['FEB'];
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$cx7= $x.'-06';
$jun = mysql_query("select count(*) as FEB from ticket where close_date like '%$cx7%' and status='Close' order by ticket_id desc");
$jun1=  mysql_fetch_array($jun);
$juni = $jun1['FEB'];
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$cx8= $x.'-07';
$jul = mysql_query("select count(*) as FEB from ticket where close_date like '%$cx8%' and status='Close' order by ticket_id desc");
$jul1=  mysql_fetch_array($jul);
$juli = $jul1['FEB'];
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$cx9= $x.'-08';
$ag = mysql_query("select count(*) as FEB from ticket where close_date like '%$cx9%' and status='Close' order by ticket_id desc");
$ag1=  mysql_fetch_array($ag);
$agustus = $ag1['FEB'];
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$cx10= $x.'-09';
$oxt = mysql_query("select count(*) as CANT from ticket where close_date like '%$cx10%' and status='Close' order by ticket_id desc");
$oxt1=  mysql_fetch_array($oxt);
$kk = $oxt1['CANT'];
$september = $kk;
echo $cx10;
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$cx11= $x.-11;
$nop = mysql_query("select count(*) as FEB from ticket where close_date like '%$cx11%' and status='Close' order by ticket_id desc");
$nop1=  mysql_fetch_array($nop);
$nopember = $nop1['FEB'];
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$cx12= $x.-12;
$des = mysql_query("select count(*) as CANT from ticket where close_date like '%$cx12%' and status='Close' order by ticket_id desc");
$des1=  mysql_fetch_array($des);
$desember = $des1['CANT'];
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

$cx24= $x.-10;
$sep = mysql_query("select count(*) as CANT from ticket where close_date like '%$cx24%' and status='Close' order by ticket_id desc");
//var_dump(mysql_fetch_array($jan));
$fetch=  mysql_fetch_array($sep);
$jumlahrecord = $fetch['CANT'];
$oktober =$jumlahrecord;

//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

echo "
<graph caption='Daily Visits' subcaption='(from $a)' hovercapbg='FFECAA' hovercapborder='F47E00' formatNumberScale='0' decimalPrecision='0' showvalues='0' numdivlines='3' numVdivlines='0' yaxisminvalue='10' yaxismaxvalue='80'  rotateNames='1'>
<categories >
	<category name='Jan' />
	<category name='Feb' />
	<category name='Mar' />
	<category name='Apr' />
	<category name='May' />
	<category name='Juny' />
	<category name='July' />
	<category name='Aug' />
	<category name='Sept' />
	<category name='Oct' />
	<category name='Nov' />
	<category name='Dec' />

</categories>
<dataset seriesName='Closed Ticket by Year' color='1D8BD1' anchorBorderColor='1D8BD1' anchorBgColor='1D8BD1'>
	<set value='$january' />
	<set value='$february' />
	<set value='$maret' />
	<set value='$april' />
	<set value='$meys' />
	<set value='$juni' />
	<set value='$juli' />
	<set value='$agustus' />
	<set value='$september' />
	<set value='$oktober' />
	<set value='$nopember' />
	<set value='$desember' />
	</dataset>


</graph>



";

?>